"""
建禄格和月刃格
"""
from ..consts.zhangsheng_consts import ZHANG_SHENG


def jianlu(mp):
    """
    建禄格
    """
    rizhu = mp.riyuan.gan
    yueling = mp.yueling.zhi
    return ZHANG_SHENG[(rizhu.name, yueling.name)] == '临官'


def yueren(mp):
    """
    月刃格
    """
    rizhu = mp.riyuan.gan
    yueling = mp.yueling.zhi
    return rizhu.yinyang.is_yang() and ZHANG_SHENG[(rizhu.name, yueling.name)] == '帝旺'
